package com.ideal.manage.esms.repository.project;

import com.ideal.manage.esms.bean.project.EquipmentInfo;
import com.ideal.manage.esms.bean.project.ParameterInfo;
import com.ideal.manage.esms.repository.framework.BaseRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EquipmentInfoRepository extends BaseRepository<EquipmentInfo,String> {
    /**
     * 根据设备类型找到所有要显示的数据
     *
     * @param equipmentType 设备类型
     * @return
     */
    @Query("select e from EquipmentInfo e where e.isValid=1 and e.objName=?1")
    List<EquipmentInfo> findListByTypeForMonitor(Integer equipmentType);

    @Query("select e.code from EquipmentInfo e where e.isValid=1")
    List<EquipmentInfo> findCode();

    @Query("select e from EquipmentInfo e where e.isValid=1 ")
    List<EquipmentInfo> findByisValid();
}
